const app = getApp(); //引入导航

var util = require('../../utils/common.js'); //引入公共JS


var wxParse = require('../../wxParse/wxParse.js'); //引入


import { InKnow } from 'inKnow_model.js';
var inKnow = new InKnow();
Page({
  data: {
    showIcon: true //显示返回键以及首页

  },
  onLoad: function (options) {
    var aid = options.aid;
    var qyid = options.qyid;
    this.data.aid = aid;
    this.data.qyid = qyid;

    this._onLoad();
  },
  _onLoad: function () {
    inKnow.getJqcontent(this.data.aid, this.data.qyid, res => {
      wxParse.wxParse('xlongName', 'html', res.xlongName, this, 5);
    });
  },
  //分享
  onShareAppMessage: function () {
    util.sharePage();
  },

  //返回上一页
  headerBack() {
    tt.navigateBack({
      delta: 1,

      fail(e) {
        tt.navigateBack();
        console.log(e);
      }

    });
  },

  // 获取滚动条当前位置
  onPageScroll: function (e) {
    if (e.scrollTop > 100) {
      this.setData({
        floorstatus: true
      });
    } else {
      this.setData({
        floorstatus: false
      });
    }
  },
  //回到顶部
  goTop: function () {
    // 一键回到顶部
    util.goTop();
  }
});